package com.tingfeng.dao;

import com.tingfeng.pojo.User;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

// 继承 SqlSessionDaoSupport 可直接生成sqlSession 省去了注入
public class UserMapperImplTwo extends SqlSessionDaoSupport implements UserMapper{
    @Override
    public List<User> getUserInfo() {
        // 直接一行
        return getSqlSession().getMapper(UserMapper.class).getUserInfo();
    }
}
